import {director, _decorator} from 'cc';
import {UiDialog} from '../UiDialog';
import {UIBuffChoose} from '../layout/UIBuffChoose';
import {UiManager} from "../../framework/manager/UiManager";
import {Constant} from "../../config/Constant";

const { ccclass } = _decorator;

@ccclass('UIBuff')
export class UIBuff extends UiDialog {
    show(){
        //更新子节点选项
        let m=this.node.children[1].getComponent(UIBuffChoose)
        m.show()
    }

    close(){
        if (director.isPaused()) {
            UiManager.instance.hideDialog(Constant.DIALOG_DEF.UIBuff);
        } else {
            UiManager.instance.showDialog(Constant.DIALOG_DEF.UIBuff);
        }
    }
}


